package com.kevin.enums;

public enum RowOp {
	//未设置，设置所有
	NONE(-1,"未设置"),
	//输出所有，但不包括Null值的列
	IGNORENULL(0,"忽略Null"),
	//输出具有插入状态的值
	INSERT(1,"插入"),
	//输出具有更新状态的值
	UPDATE(2,"更新");
	
	private Integer key;
	private String des;
	
	RowOp(Integer key,String des) {
		this.key = key;
		this.des = des;
	}
	
    public static RowOp valueofKey(Integer key) {
        for (RowOp op : RowOp.values()) {
            if (op.key.equals(key)) {
                return op;
            }
        }
        throw new IllegalArgumentException("No element matches " + key);
    }
    
    public Integer getKey() {
        return key;
    }
    
    public String getDes() {
        return des;
    }
}
